public class Exer3_8_9 {
    public static void main(String[] args) {
        int i=100;
        while(i<1000){
            if((i%10)*(i%10)*(i%10)+(i%100/10)*(i%100/10)*(i%100/10)+(i/100)*(i/100)*(i/100)==i){
                System.out.println(i);
            }
            i++;
        }
    }
}
